<template>
  <div>
      <input type="text" v-focus>
  </div>
</template>

<script>
export default {
components: { },
  name: '',
  //局部自定义指令
  directives:{
      focus:{
          inserted(el,binding){
              el.focus()
          }
      }
  },
  data() {
    return {};
  },
  mounted() {},
  methods: {},
  computed: {},
  watch: {},
};
</script>

<style lang='scss' scoped>
</style>
